package com.ruoyi.inducePest.service.device;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.inducePest.domain.device.DeviceBoardRecord;
import com.ruoyi.inducePest.domain.device.DeviceTypeAndCount;
import com.ruoyi.inducePest.domain.device.InduceDeviceInfo;
import com.ruoyi.inducePest.domain.device.Lure;
import com.ruoyi.permission.Dao.SerDevicePermi;

import java.io.IOException;
import java.util.List;

public interface InduceDeviceService {

    /**
     * 查询所有的设备信息
     * @return
     */
    public TableDataInfo selectAllDeviceInfo();

    /**
     * 根据条件查询设备属性
     * @return
     */
    public TableDataInfo selectDeviceInfoByCondition(InduceDeviceInfo induceDeviceInfo, List<SerDevicePermi> allDeviceInfos);

    public InduceDeviceInfo selectDeviceInfoByDeviceId(Integer deviceId);

    /**
     * 插入设备信息
     * @param induceDeviceInfo
     * @return
     */
    public int insertDeviceInfo(InduceDeviceInfo induceDeviceInfo);



    /**
     * 根据id修改设备属性
     * @param induceDeviceInfo
     * @return
     */
    public int updateDeviceInfoById(InduceDeviceInfo induceDeviceInfo) throws IOException;

    /**
     * 查询设备类别及对应数量
     *
     * @return
     */
    public List<DeviceTypeAndCount> selectDeviceTypeAndCount();

    /**
     * 根据条件查询设备属性
     * @return
     */
    public TableDataInfo selectDeviceBoardRecordByCondition(DeviceBoardRecord deviceBoardRecord, Integer pageNum, Integer pageSize);

    List<String> selecAlltLure();

    int insertLure(Lure lure);

    int updateLure(Lure lure);

    int deleteLure(Lure lure);

    List<Lure> selectLure(Lure lure);

    String getDeviceNameByDeviceId(Integer deviceId);
}
